<?php

use Phinx\Migration\AbstractMigration;

class AddTenantRobotUserCertificateIdInDeviceTable extends AbstractMigration
{
    public function up()
    {
        $this->table("oauth_device")
            ->addColumn(
                "tenant_robot_user_certificate_id",
                "integer",
                [
                    'limit' => 11,
                    'signed' => false,
                    'comment' => '租户机器人授权秘钥id',
                    'null' => false,
                    'default' => 0,
                ])->save();
    }

    public function down()
    {
        $this->table("oauth_device")
            ->removeColumn("tenant_robot_user_certificate_id")
            ->save();
    }
}
